;Assembler header file for MessageTrans
;written by DefMod (Dec 31 2005) on Sat Dec 31 14:03:53 2005
;Jonathan Coxhead, jonathan@doves.demon.co.uk, 18 May 1995

        [       :LNOT: :DEF: MessageTrans_Hdr
        GBLS    MessageTrans_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_OS
        GBLS    Get_OS
        ]
        [       :LNOT: :DEF: OS_Hdr
Get_OS                          SETS    "GET oslib/OS.Hdr"
        |
Get_OS                          SETS    ""
        ]
        $Get_OS

;Symbols for constants
MessageTrans_DirectAccess       *       &1
Error_MessageTransSyntax        *       &AC0
Error_MessageTransFileOpen      *       &AC1
Error_MessageTransTokenNotFound *       &AC2
Error_MessageTransRecurse       *       &AC3

;Symbols for structure offsets and sizes
                                ^       0
MessageTrans_ControlBlock_cb    #       4*Int
MessageTrans_ControlBlock       *       @

                                ^       0
                                #       Bits
MessageTrans_FileFlags          *       @


;Symbols for SWI's and SWI reason codes
XMessageTrans_FileInfo          *       &61500
MessageTrans_FileInfo           *       &41500
   ;Entry
   ;  R1 -> file_name (String)
   ;Exit
   ;  R0 = flags (MessageTrans_FileFlags)
   ;  R2 = size (Int)

XMessageTrans_OpenFile          *       &61501
MessageTrans_OpenFile           *       &41501
   ;Entry
   ;  R0 = cb (pointer to MessageTrans_ControlBlock)
   ;  R1 -> file_name (String)
   ;  R2 = buffer (pointer to String)

XMessageTrans_Lookup            *       &61502
MessageTrans_Lookup             *       &41502
   ;Entry
   ;  R0 -> cb (MessageTrans_ControlBlock)
   ;  R1 -> token (String)
   ;  R2 = buffer (pointer to String)
   ;  R3 = size (Int)
   ;  R4 -> arg0 (String)
   ;  R5 -> arg1 (String)
   ;  R6 -> arg2 (String)
   ;  R7 -> arg3 (String)
   ;Exit
   ;  R2 -> result (String)
   ;  R3 = used (Int)

XMessageTrans_MakeMenus         *       &61503
MessageTrans_MakeMenus          *       &41503
   ;Entry
   ;  R0 -> cb (MessageTrans_ControlBlock)
   ;  R1 -> menus (data)
   ;  R2 = buffer (pointer to String)
   ;  R3 = size (Int)
   ;Exit
   ;  R3 = used (Int)

XMessageTrans_CloseFile         *       &61504
MessageTrans_CloseFile          *       &41504
   ;Entry
   ;  R0 -> cb (MessageTrans_ControlBlock)

XMessageTrans_EnumerateTokens   *       &61505
MessageTrans_EnumerateTokens    *       &41505
   ;Entry
   ;  R0 -> cb (MessageTrans_ControlBlock)
   ;  R1 -> token (String)
   ;  R2 = buffer (pointer to String)
   ;  R3 = size (Int)
   ;  R4 = context (Int)
   ;Exit
   ;  R2 = more (Bool)
   ;  R3 = used (Int)
   ;  R4 = context_out (Int)

XMessageTrans_ErrorLookup       *       &61506
MessageTrans_ErrorLookup        *       &41506
   ;Entry
   ;  R0 -> error (OS_Error)
   ;  R1 -> cb (MessageTrans_ControlBlock)
   ;  R2 = buffer (pointer to OS_Error)
   ;  R3 = size (Int)
   ;  R4 -> arg0 (String)
   ;  R5 -> arg1 (String)
   ;  R6 -> arg2 (String)
   ;  R7 -> arg3 (String)

XMessageTrans_GSLookup          *       &61507
MessageTrans_GSLookup           *       &41507
   ;Entry
   ;  R0 -> cb (MessageTrans_ControlBlock)
   ;  R1 -> token (String)
   ;  R2 = buffer (pointer to String)
   ;  R3 = size (Int)
   ;  R4 -> arg0 (String)
   ;  R5 -> arg1 (String)
   ;  R6 -> arg2 (String)
   ;  R7 -> arg3 (String)
   ;Exit
   ;  R2 -> result (String)
   ;  R3 = used (Int)

XMessageTrans_CopyError         *       &61508
MessageTrans_CopyError          *       &41508
   ;Entry
   ;  R0 -> error (OS_Error)
   ;Exit
   ;  R0 -> copy (OS_Error)

XMessageTrans_Dictionary        *       &61509
MessageTrans_Dictionary         *       &41509
   ;Exit
   ;  R0 -> dictionary (data)

Service_MessageFileClosed       *       &5E
   ;Entry
   ;  R0 -> cb (MessageTrans_ControlBlock)
   ;  R1 = &5E

        ]
        END
